﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreData;
using EntityData;
using Helper;

namespace Services
{
    public partial class user_groupService
    {
        readonly Iuser_groupEntity entity;

        public user_groupService(Iuser_groupEntity entity)
        {
            this.entity = entity;

        }

        #region Main Method

        /// <summary>
        /// Save 
        /// </summary>
        /// <param name="_model"></param>
        /// <returns></returns>
        public long Save(object _model)
        {
            try
            {
                CoreData.user_group model = (CoreData.user_group)_model;
                var id = ConnectHostService.Prodiver().SaveUserGroup(model.userid, model.groupid);
                if (id > 0)
                {
                    return id;
                }
                return -1;
            }
            catch
            {
                return -1;
            }
        }
        
        #endregion

        #region Other Method

        #endregion 
    
    }
}
